Crate bevy_kira_audio[][src]

Expand description

Audio plugin for the game engine Bevy

It uses the library Kira to play audio and offers an API to control running game audio via Bevy’s ECS.

fn main() {
   let mut app = App::build();
   app
        .add_plugins(DefaultPlugins)
        .add_plugin(AudioPlugin)
        .add_startup_system(start_background_audio.system());
   app.run();
}

fn start_background_audio(asset_server: Res<AssetServer>, audio: Res<Audio>) {
    audio.play_looped(asset_server.load("background_audio.mp3"));
}

Structs

Audio

Bevy Audio Resource

AudioChannel

A channel to play audio in

AudioPlugin

A Bevy plugin to add audio functionallity

AudioSource

A source of audio data

AudioStreamPlugin

A Bevy plugin for streaming of audio

Frame

A single Frame of an audio stream

StreamedAudio

Use this resource to start and stop audio streams

Traits

AudioStream

An audio stream producing frames